  {% load static from staticfiles %}
<head>
  <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.0.3.min.js"> </script>
  <link media="print, projection, screen" type="text/css" href="{{ STATIC_URL }}themes/blue/style.css" rel="stylesheet">
  <link media="print, projection, screen" type="text/css" href="{{ STATIC_URL }}css/jq.css" rel="stylesheet">
  <script type="text/javascript" src="{{ STATIC_URL }}js/jquery.tablesorter.min.js"> </script>
</head>

Payment request: <br/>
	
{% if messages %}
    {% for message in messages %}
       {{ message }} <br/>
    {% endfor %}
{% endif %}

<table id="reqApprovalPaymentTable" class="tablesorter">
    <thead> 
    	<tr> 
    		<th>Submit Date</th>
    		<th>Update Date</th>
    		<th>Amount</th>
    		<th>Bank name</th>
    		<th>Status</th>
    		<th>Action</th>
    		<th>Comment</th>
    	</tr> 
    </thead> 
    <tbody>
      {% for payment in payments %}
        <tr>
  			<td>
  				{{payment.cretion_date}}
  			</td>
  			<td>
  				{{payment.update_date}}
  			</td>
  			<td>
  				{{payment.amount}}
  			</td>
  			<td>
  				<a href="/member/merchant/bank/{{payment.merchant.id}}/"> {{payment.merchant.bank.bank_name}} </a>
  			</td>
  			<td>
  				{{payment.getStatus}}
  			</td>
  			<td>
  			    {% if payment.isPending %}
  			    	<table>
  			    		<tr>
  							<a href="/admins/console/payment/pay/{{payment.id}}/"> Mark as paid </a> <br/>
  						</tr>
  						<tr>
  							<form enctype="multipart/form-data" name="fulFillRequesForm" method="post" action="/admins/console/payment/reject/{{payment.id}}/">
   							<textarea name="reject_comment" cols="30" id="profile" rows="2"/> {{payment.rejection_comment}}</textarea><br/>
   							<input value="reject" type="submit" id="send" name="send">
  		 					{% csrf_token %} 
							</form>						
						</tr>
					</table>
  				{% endif %}
  			</td>
  			<td>
  				{{payment.rejection_comment}}
  			</td>
  		</tr>
  	  {% endfor %}		
    </tbody>
 </table>